feat(website): make error tooltip direction configurable in AdvancedQueryFilter - #1204
Merged
Conversation
…ueryFilter Adds an optional `errorTooltipClass` prop to `AdvancedQueryFilter` (and the internal `ErrorIconWithTooltip`) so callers can control which direction the validation error tooltip opens. Defaults to the original `tooltip-left lg:tooltip-right` so existing usages are unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
fengelniederhammer
approved these changes
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new optional prop to AdvancedQueryFilter to let callers control the direction (and responsive behavior) of the validation error tooltip by forwarding a custom tooltip direction class string down to the internal tooltip component, preserving the existing default behavior.
Changes:
- Added an optional
errorTooltipClass?: stringprop toAdvancedQueryFilter. - Forwarded
errorTooltipClassintoErrorIconWithTooltip, which now accepts an optionaltooltipClassand defaults to the prior hardcoded direction classes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
109
to
+111
| {isValidating && <span className='loading loading-spinner loading-xs' title='Validating' />} | ||
| {isValid && <div className='iconify mdi--check text-success size-4' title='Advanced query is valid' />} | ||
| {isError && <ErrorIconWithTooltip message={validationState.message} />} | ||
| {isError && <ErrorIconWithTooltip message={validationState.message} tooltipClass={errorTooltipClass} />} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
errorTooltipClassprop toAdvancedQueryFilterthat is forwarded to the internalErrorIconWithTooltipcomponent, allowing callers to control which direction the validation error tooltip opens.'tooltip-left lg:tooltip-right'(the original hardcoded value), so all existing usages are unchanged.Design note
We considered using an explicit union type (
'left' | 'right' | 'top' | 'bottom') with a lookup map to avoid Tailwind purging dynamic class names. However, that approach would have made it impossible for callers to pass responsive variants liketooltip-left lg:tooltip-rightwithout introducing extra complexity. Accepting a plain class string keeps full flexibility — callers are responsible for using complete Tailwind class names so the compiler can detect them.Screenshot
With
tooltip-topTest plan
AdvancedQueryFiltershow the tooltip in the same position as before (left on small screens, right on large screens)errorTooltipClass="tooltip-top"sees the tooltip pinned top at all breakpoints🤖 Generated with Claude Code